<!--
*Author：富行天下团队
 
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Gate/M_gate.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Gate/M_gate.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'Id',
                    footer: "Foots",
                    cnName: '中控闸机',
                    name: 'M_gate',
                    url: "/M_gate/",
                    sortName: "Id"
                },
                extend: extend,
                editFormFields: {"SN":"","SupplierCode":"","GateCode":""},
                editFormOptions: [[{"title":"","required":true,"field":"SN","disabled":true,"type":"text"}],
                              [{"dataKey":"supplier","data":[],"title":"供应商编码","required":true,"field":"SupplierCode","type":"select"}],
                              [{"dataKey":"gate","data":[],"title":"关联闸机位置","required":true,"field":"GateCode","type":"select"}]],
                searchFormFields: {"SN":""},
                searchFormOptions: [[{"title":"","field":"SN","type":"like"}]],
                columns: [{field:'Id',title:'Id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'registry',title:'OK表示设备已注册',type:'string',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:90,hidden:true,align:'left',sortable:true},
                       {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,hidden:true,align:'left'},
                       {field:'ServerVersion',title:'服务器版本号',type:'string',width:220,hidden:true,align:'left'},
                       {field:'ServerName',title:'服务器名称',type:'string',width:220,hidden:true,align:'left'},
                       {field:'PushProtVer',title:'服务端依据哪个协议版本开发的，详见【附录13】',type:'string',width:220,hidden:true,align:'left'},
                       {field:'ErrorDelay',title:'联网失败后客户端重新联接服务器的间隔时间（秒），建议设置30~300秒，如果不配置客户端默认值为30秒',type:'int',width:90,hidden:true,align:'left'},
                       {field:'RequestDelay',title:'客户端获取命令请求间隔时间（秒），如果不配置客户端默认值为30秒',type:'int',width:90,hidden:true,align:'left'},
                       {field:'TransTimes',title:'定时检查传送新数据的时间点，如果不配置默认为"12:30;14:30”',type:'string',width:220,hidden:true,align:'left'},
                       {field:'TransInterval',title:'检查是否有新数据需要传送的间隔时间（分钟）,如果不配置客户端默认为2分钟 ',type:'int',width:90,hidden:true,align:'left'},
                       {field:'TransTables',title:'需要检查新数据并上传的数据，默认为"User Transaction",需要自动上传用户和门禁记录',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Realtime',title:'客户端是否实时传送新记录。 为1表示有新数据就传送到服务器，为0表示按照 TransTimes 和 TransInterval 规定的时间传送,如果不配置客户端默认值为1',type:'int',width:90,hidden:true,align:'left'},
                       {field:'SessionID',title:'PUSH 通信会话 ID, 今后设备的请求都需要此字段来计算新的 Token',type:'string',width:220,hidden:true,align:'left'},
                       {field:'TimeoutSec',title:'设置网络超时时间，如果不配置客户端默认 10秒',type:'int',width:90,hidden:true,align:'left'},
                       {field:'SN',title:'SN',type:'string',width:220,readonly:true,require:true,align:'left',sortable:true},
                       {field:'SupplierCode',title:'供应商编码',type:'string',bind:{ key:'supplier',data:[]},width:220,require:true,align:'left'},
                       {field:'GateCode',title:'关联闸机位置',type:'string',bind:{ key:'gate',data:[]},width:120,require:true,align:'left'},
                       {field:'RegistryCode',title:'服务器生成随机数，最长32个字节',type:'string',width:220,hidden:true,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
                       {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
